﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace StarClub.Web
{
    public partial class Error : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["t"]))
                this.lblTittle.Text = Request.QueryString["t"].ToString().Trim();
            if (!string.IsNullOrEmpty(Request.QueryString["msg"]))
                this.lblMsg.Text = Request.QueryString["msg"].ToString().Trim();
#if(DEBUG)
            if (Request.QueryString["t"] == null && Request.QueryString["msg"] == null)
                AutoLogin();
#endif
        }
        //调试自动登录
        void AutoLogin()
        {
            string msg = string.Empty;
            if (!StarClub.BLL.LoginFacade.Login("testuser1", "123456", out msg))
            {
                Common.MessageBox.Show(Page, msg);
                return;
            }
            Response.Redirect("Admin/");
        }
    }
}
